package org.springblade.demo2.feign;

import org.springblade.common.constant.CommonConstant;
import org.springblade.core.tool.api.R;
import org.springblade.demo2.entity.Blog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(
	value = CommonConstant.APPLICATION_DEMO2_NAME,
	//定义hystrix 配置类
	fallback = BlogClientFallback.class
)
public interface BlogClient {
	//接口前缀
	String APP_PREFIX="/api/blog";

	@GetMapping(APP_PREFIX+"/detail")
	R<Blog> detail(@RequestParam("id") Integer id);
}
